<?php
	@$localize = $_POST['localize'];
	include_once('libs/htdu_core.php');
	$exe_mysql = new execute_mysql_query();
	$g_func = new global_function();
	session_start();
	$exec_mysql = new execute_mysql_query();
	if(!isset($_SESSION['visit_count']))
	{
		$_SESSION['visit_count'] = 'DKT Group';
		$exec_mysql->execute("update extra set val = val+1 where ref = 'visit_count'", 0);
	}
?>

<?php
	/*Hàm giới hạn chữ khi hiển thị*/
	function cut($str, $len) 
	{
		$str = trim($str);
		if (strlen($str) <= $len) return $str;
		$str = substr($str, 0, $len);
		if ($str != "") {
			if (!substr_count($str, " ")) return $str." ...";
			while (strlen($str) && ($str[strlen($str) - 1] != " ")) $str = substr($str, 0, -1);
			$str = substr($str, 0, -1)." ...";
		}
		return $str;
	}	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
        <title>ĐẢNG ỦY KHỐI DÂN CHÍNH ĐẢNG TỈNH CÀ MAU</title>
        <link rel="stylesheet" type="text/css" href="css/layout.css" />
		<link rel="stylesheet" href="css/nivo-slider.css" type="text/css" media="screen" />
        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script src="js/jquery.nivo.slider.pack.js" type="text/javascript"></script>
		<script src="js/home.js" type="text/javascript"></script>
    </head>
    
    <body>
    	<div class="border">
        	<!--headef-->
        	<div class="header">
				<div class="co-bay">
				  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="222" height="89">
					<param name="movie" value="img/cobay.swf" />
					<param name="quality" value="high" />
					<embed src="img/cobay.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="222" height="89"></embed>
				  </object>
			  </div>
			  <div class="banner"></div>
			</div>
            
            <!--menu-->
            <div class="menu">
				<ul>
					<li><a href=".">Trang chủ</a></li>
					<li><a href="gioi-thieu-chung.html">Giới thiệu chung</a></li>
					<li><a href="hoat-dong-dang-bo-khoi.html">Hoạt động Đảng bộ khối</a></li>
					<li><a href="huong-dan-nghiep-vu.html">Hướng dẫn nghiệp vụ</a></li>
					<li><a href="hoat-dong-tccs-dang.html">Hoạt động TCCS Đảng</a></li>
					<li><a href="van-ban.html">Văn bản</a></li>
					<li><a href="thong-tin-ly-luan.html">Thông tin lý luận</a></li>
					<li><a href="chinh-tri-xa-hoi.html">Chính trị - Xã hội</a></li>
					<li><a href="tu-lieu.html">Tư liệu</a></li>		
				</ul>
			</div>
            
            <!--date + search-->
            <div class="date">
				<div class="date-ngay">
					<div class="date-ngay-text"><?php include("thoigian.php"); ?></div>
				</div>
				<div class="date-marquee">
					<div class="date-marquee-text">
						<marquee scrollamount="4" onmouseover="this.stop();" onmouseout="this.start();">
							<?php
								$marquee = $exec_mysql->execute("select val from extra where ref = 'event_1'", 1);
								echo $marquee;
							?>
						</marquee>
					</div>
				</div>								
				<div class="date-search">
					<input name="q" class="textbox-search" value="" id="txt-keyword" />				
				</div>
			</div>
            
            <!--news 1-->
            <div class="news-1">
            	<!--block 1-->
                <div class="news-1-block-1">
					<div class="new-1-block-1-hinh">
					<!--Tin mới nhất trên trang chủ First-->
						<?php
							$result = $exe_mysql->execute("select nt.id, name, n.id, id_type, note, img, title, description, date from node n, node_type nt where id_type = nt.id and note = 0 and id_type <> 1  order by date desc limit 1",0);
							while($row = mysql_fetch_array($result))
							{
								$func = new global_function();
								$cat = $func->remove_sign($row["name"]);
								$title = $func->remove_sign($row["title"]);
								echo '<a href="'.$cat.'/'.$title.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" width="477px" height="300px" />'.'</a>';
								echo '<div class="new-1-block-1-title">';
									echo '<a href="'.$cat.'/'.$title.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.$row['title'].'</a>';
								echo '</div>';
							}
						?>
					</div>
				</div>
                
                <!--block 2-->
                <div class="news-1-block-2">
					<div class="new-1-block-2-hearder">
						<div class="new-1-block-2-text">TIN MỚI</div>
					</div>
					<div class="block_contain_new">
							<?php
								$result = $exe_mysql->execute("select nt.id, name, n.id, id_type, note, img, title, description, date from node n, node_type nt where id_type = nt.id and id_ref = 0 and id_type <> 1  order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$cat = $func->remove_sign($row["name"]);
									$title = $func->remove_sign($row["title"]);
									echo '<div class="block_hinh_title">';
										echo '<div class="block_hinh">'.'<a href="'.$cat.'/'.$title.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" width="130px" height="100px" />'.'</a>'.'</div>';
										echo '<div class="link-more">'.'<a href="'.$cat.'/'.$title.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
									echo '</div>';
								}
							?>	
					</div>
				</div>
                
            </div>
            
            <!--news 2-->
            <div class="news-2">
				<div class="new-2-header">
					<div class="new-2-header-text">TIN NỔI BẬT</div>
				</div>
				<?php
					$result = $exe_mysql->execute("select nt.id, name, n.id, id_type, note, title, description, date from node n, node_type nt where id_type = nt.id and note = 0 and id_type <> 1  order by date desc limit 8",0);
					while($row = mysql_fetch_array($result))
					{
						$func = new global_function();
						$cat = $func->remove_sign($row["name"]);
						$title = $func->remove_sign($row["title"]);
						echo '<div class="new-2-title">'.'<a href="'.$cat.'/'.$title.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],35).'</a>'.'</div>';
						echo '<div class="new-2-content">'.cut($row['description'],100).'</div>';
					}
				?>
			</div>
            
            <!--adv-->
            <div class="adv">
            	<!--block 1-->
                <div class="adv-block-1">
					<a href="hoc-tap-va-lam-theo-tam-guong-dao-duc-ho-chi-minh.html"><img src="img/lk_HCM.png" height="100%" width="268px" style="padding:1px;"/></a>
				</div>
            
            	<!--block 2-->
                <div class="adv-block-2">
					<a href=""><img src="img/lk_nghiquyet.png" width="268px" height="100%" style="padding:1px;" /></a>
				</div>
                
                <!--block 3-->
                <div class="adv-block-3">
					<a href="http://xaydungdang.org.vn/" target="_blank"><img src="img/anh_xaydungdang1.png" height="100%" width="268px" style="padding:1px;"/></a>
				</div>
            </div>
            
            <!--event-->
            <div class="event">
				<div class="event-icon">
					<div class="event-text">LỊCH SỰ KIỆN</div>
				</div>
				<div class="event-marquee">
					<div class="event-marquee-text">
						<marquee scrollamount="4" onmouseover="this.stop();" onmouseout="this.start();">
							<?php
								$event_2 = $exec_mysql->execute("select val from extra where ref = 'event_2'", 1);
								echo $event_2;
							?>
						</marquee>
					</div>
				</div>
			</div>
            
            <!--left-->
            <div class="left">
            	<!--line 1-->
                <div class="left-line-1">
                	<!--line 1 bolck 1-->
                    <div class="left-line-1-block-1">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="hoat-dong-dang-bo-khoi.html" class="link-more-all">'.'Hoạt động Đảng bộ Khối'.'</a>'.'</div>';
							?>
						</div>
						
								<?php
								$result = $exe_mysql->execute("select * from node where id_type = 5  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="hoat-dong-dang-bo-khoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="hoat-dong-dang-bo-khoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="hoat-dong-dang-bo-khoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 5 and id <> (select id from node where id_type = 5 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="hoat-dong-dang-bo-khoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                    
                    <!--line 1 bolck 2-->
                    <div class="left-line-1-block-2">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="huong-dan-nghiep-vu.html" class="link-more-all">'.'Hướng dẫn nghiệp vụ'.'</a>'.'</div>';
							?>
						</div>
							<?php
									$result = $exe_mysql->execute("select * from node where id_type = 3  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="huong-dan-nghiep-vu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="huong-dan-nghiep-vu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="huong-dan-nghiep-vu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 3  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 3 and id <> (select id from node where id_type = 3 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="huong-dan-nghiep-vu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                </div>
                
                <!--line 2-->
  <!--              <div class="left-line-2">
                	
                    <div class="left-line-2-block-1"></div>
                    
                    
                    <div class="left-line-2-block-2"></div>
                    
                    
                    <div class="left-line-2-block-3"></div>
                </div>
  -->              
                <!--line 3-->
                <div class="left-line-1 margin-top">
                	<!--line 1 bolck 1-->
                    <div class="left-line-1-block-1">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="hoat-dong-tccs-dang.html" class="link-more-all">'.'Hoạt động TCCS Đảng'.'</a>'.'</div>';
							?>
						</div>
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 8  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="hoat-dong-tccs-dang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="hoat-dong-tccs-dang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="hoat-dong-tccs-dang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 8  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 8 and id <> (select id from node where id_type = 8 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="hoat-dong-tccs-dang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                    
                    <!--line 1 bolck 2-->
                    <div class="left-line-1-block-2">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="thong-tin-ly-luan.html" class="link-more-all">'.'Thông tin lý luận'.'</a>'.'</div>';
							?>
						</div>
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 2  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="thong-tin-ly-luan/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="thong-tin-ly-luan/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="thong-tin-ly-luan/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 2  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 2 and id <> (select id from node where id_type = 2 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="thong-tin-ly-luan/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                </div>
                
                <!--line 4-->
                <div class="left-line-1 margin-top">
                	<!--line 1 bolck 1-->
                    <div class="left-line-1-block-1">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="chinh-tri-xa-hoi.html" class="link-more-all">'.'Chính trị - Xã hội'.'</a>'.'</div>';
							?>
						</div>
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 4  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="chinh-tri-xa-hoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="chinh-tri-xa-hoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="chinh-tri-xa-hoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 4  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 4 and id <> (select id from node where id_type = 4 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="chinh-tri-xa-hoi/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                    
                    <!--line 1 bolck 2-->
                    <div class="left-line-1-block-2">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="van-hoa-giai-tri.html" class="link-more-all">'.'Văn hóa - Giải trí'.'</a>'.'</div>';
							?>
						</div>
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 6  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="van-hoa-giai-tri/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="van-hoa-giai-tri/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="van-hoa-giai-tri/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 6  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 6 and id <> (select id from node where id_type = 6 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="van-hoa-giai-tri/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                </div>
                      
                <!--line 6-->
                <div class="left-line-1 margin-top">
                	<!--line 1 bolck 1-->
                    <div class="left-line-1-block-1">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="tu-lieu.html" class="link-more-all">'.'Tư liệu'.'</a>'.'</div>';
							?>
						</div>
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 7  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="tu-lieu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="tu-lieu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="tu-lieu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 7  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 7 and id <> (select id from node where id_type = 7 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="tu-lieu/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                    
                    <!--line 1 bolck 2-->
                    <div class="left-line-1-block-2">
						<div class="new-2-header">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="diem-sang.html" class="link-more-all">'.'Điểm sáng'.'</a>'.'</div>';
							?>
						</div>
							<?php
								$result = $exe_mysql->execute("select * from node where id_type = 9  order by date desc limit 1",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="main-contain-new">';
										echo '<div class="main-contain-hinh">'.'<a href="diem-sang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html">'.'<img src="'.$row['img'].'" height="120px" width="160px" alt="'.$row['title'].'" title="'.$row['title'].'" />'.'</a>'.'</div>';
										echo '<div class="main-contain-title">'.'<a href="diem-sang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],50).'</a>'.'</div>';
										echo '<div class="main-contain-cont">'.cut($row['description'],100).'</div>';
										echo '<div class="view-more">'.'<a href="diem-sang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'."Xem tiếp>>".'</a>'.'</div>';
									echo '</div>';
								}
								?>
						
						<div class="title-cung-loai">
							<?php
								//$result = $exe_mysql->execute("select * from node where id_type = 9  order by date desc limit 3",0);
								$result = $exe_mysql->execute("select * from node where id_type = 9 and id <> (select id from node where id_type = 9 order by date desc limit 1) order by date desc limit 3",0);
								while($row = mysql_fetch_array($result))
								{
									$func = new global_function();
									$str = $func->remove_sign($row["title"]);
									echo '<div class="title-cung-loai-icon">';
										echo '<div class="title-cung-loai-title">'.'<a href="diem-sang/'.$str.'/'.$row['id_type'].'/'.$row['id'].'.html" class="link-more">'.cut($row['title'],200).'</a>'.'</div>';
									echo '</div>';
								}
							?>
						</div>
					</div>
                </div>
                
                <!--line 7-->
                <div class="line-7">
					<div class="new-2-header">
						<div class="new-1-block-2-text"><a href="" class="link-more" style="color:#FF0000">THƯ VIỆN ẢNH</a></div>
					</div>
					<marquee scrollamount="4" onmouseover="this.stop();" onmouseout="this.start();">
					<div class="block_contain_new">
						<!--<div class="block_hinh_title">
							<div class="block_hinh"><img src="img_lib/14.jpg" width="130px" height="100px" /></div>
							<div class="link-more">Album hoạt động 1</div>
						</div>-->
						
						<?php
							@$directory = "img_lib/";
							//foreach(glob("img_lib/.") as $direc)
							//{
							//	print('<img src="'.$direc.'" />');
							//}
							$result = $exe_mysql->execute("select dab.album_id, image_name, album_name from detail_album dab, album ab where ab.album_id = dab.album_id group by dab.album_id",0);
							while($row = mysql_fetch_array($result))
							{
								echo '<div class="block_hinh_title">';
									echo '<div class="block_hinh">'.'<a href="thu-vien-anh-'.$row['album_id'].'.html">'.'<img src="'."img_lib/".$row['image_name'].'" width="130px" height="100px" />'.'</a>'.'</div>';
									echo '<div class="link-more">'.'<a href="thu-vien-anh-'.$row['album_id'].'.html" class = "link-more">'.$row['album_name'].'</a>'.'</div>';
								echo '</div>';
							}
						?>
					</div>
					</marquee>
				</div>
            </div>
            
            <!--right-->
            <div class="right">
            	<!--line 1-->
				<div class="new-2-header">
					<div class="new-1-block-2-text">
					<?php 
						echo '<div class="new-1-block-2-text">'.'<a href="van-ban.html" class="link-more-all">'.'VĂN BẢN'.'</a>'.'</div>';
					?>
					</div>
				</div>
                <div class="right-line-1" style="overflow:auto">
					
					<?php
					$result = $exe_mysql->execute("select id, id_cat, num, date_format(date_pub, '%d/%m%/%Y') as date_pub, date_format(date_eff, '%d/%m%/%Y') as date_eff, sub, link from document order by date_pub desc limit 10",0);
					
					while($row = mysql_fetch_array($result))
					{
						@$filename = "document/".$row['link'];
						echo '<div class="title-cung-loai-icon">';
							echo '<div class="title-cung-loai-title">'.'<a href="'.$filename.'" class="link-more">'.$row['sub'].' (ngày ban hành: '.$row['date_pub'].')'.'</a>'.'</div>';
						echo '</div>';
					}
					?>
				</div>
                
                <!--line 2-->
                <div class="right-line-2">
					<div class="new-2-header">
						<div class="new-1-block-2-text">
							<?php 
								echo '<div class="new-1-block-2-text">'.'<a href="" class="link-more-all">'.'VIDEOS CLIP'.'</a>'.'</div>';
							?>
						</div>
					</div>
				</div>
                
                <!--line 3-->
                <div class="right-line-3">
					<a href="http://xaydungdang.org.vn/" target="_blank"><img src="img/anh_tapchicongsan.png" width="100%" height="100%"/></a>
				</div>
                
                 <!--line 4-->
                <div class="right-line-3">
					<a href="http://dangcongsan.vn/cpv/" target="_blank"><img src="img/lk_dcs.png" width="100%" height="100%"/></a>
				</div>
                
                 <!--line 5-->
                <div class="right-line-3">
					<a href="http://congbao.chinhphu.vn/" target="_blank"><img src="img/congbaochinhphu.png" height="100%" width="100%"/></a>
				</div>
                
                 <!--line 6-->
                <div class="right-line-3">
					
				</div>
               
                
                 <!--line 8-->
                <div class="right-line-8">
				</div>
            	
            </div>
            
            <!--bottom-->
            <div class="bottom">
				<div class="bottom-text">
					COPYRIGHT © 2013 BẢN QUYỀN THUỘC VỀ ĐẢNG ỦY KHỐI DÂN CHÍNH ĐẢNG TỈNH CÀ MAU.</br>
					Số 94, Đường Phan Ngọc Hiển - Khóm 6 - Phường 5 - Tp. Cà Mau.</br>
					Điện thoại: 0780. 3 830 017
				</div>
			</div>
            
            <!--footer-->
            <div class="footer">
				<div class="footer-text">
					<span style="color:#000000;">Thiết kế và Phát triển bởi</span>
					<span style="color:#0000FF; font-weight:bold;"> Trung tâm Công nghệ Thông tin và Truyền thông tỉnh Cà Mau.</span>
				</div>
				<div class="footer-visit">
					<span style="margin-top:12px; font-size:14px;">Tổng lượt truy cập</span>
					<div class="footer-visit-text">
						<?php
						$visit_cout = $exec_mysql->execute("select val from extra where ref = 'visit_count'", 1);
						echo $visit_cout;
						?>
					</div>
				</div>
			</div>
        </div>
    </body>
</html>